﻿--use PolePosition
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'up_VendorDistributionPole_SelectIdList')
	DROP PROCEDURE up_VendorDistributionPole_SelectIdList
GO

CREATE PROCEDURE up_VendorDistributionPole_SelectIdList
	 @Vendor_ProjectFK int 
	,@SearchByType varchar(50) = null
	,@SearchByText varchar(50) = null
	
AS

DECLARE @IdList varchar(MAX)
SET @IdList = ''


SELECT 
	 @IdList = @IdList + CONVERT(varchar, [Vendor_Distribution_Poles_PoleId]) + ','
FROM v_tb_Vendor_Distribution_Poles Pole
WHERE 
	Pole.[ProjectFk] = @Vendor_ProjectFK

SELECT @IdList

GO

